<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SincereAgentList.aspx.cs"
    Inherits="admin_Agent_SincereAgentList" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>招商信息管理</title>
<link rel="stylesheet" href="../skin/style.css" type="text/css" />

   <script type="text/javascript" src="../../js/jquery.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="itemtitle">
            <h3>
                信息搜索</h3>
      </div>
        <div class="itemtitle_tect">
         <p>信息搜索：<asp:TextBox ID="txtTitleName" runat="server"></asp:TextBox>
                <asp:DropDownList
                    ID="dropAgentType" runat="server" AutoPostBack="True" >  </asp:DropDownList>

                <asp:Button ID="btnSearch" runat="server" Text="立即查询" OnClick="btnSearch_Click" CssClass="i_button" /></p>
      </div>
        <div class="clr">
        </div>
        <div class="partition">
            <div class="Option">
                <asp:Label ID="Label5" runat="server"><strong>快捷操作</strong></asp:Label>
                <asp:Label ID="Label1" runat="server"><a href="?v=0" onclick="redirection(this,'verify')">所有信息</a></asp:Label>
                <asp:Label ID="Label2" runat="server"><a href="?v=1">已审核信息</a></asp:Label>
                <asp:Label ID="Label3" runat="server"><a href="?v=2">未审核信息</a></asp:Label>
                <asp:Label ID="Label4" runat="server"><a href="?v=3">推荐信息</a></asp:Label>
            </div>
        </div>
        <div class="clr">
        </div>
        <div class="talbe_border">
            <asp:GridView ID="grdSincereAgent" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                GridLines="None" CssClass="talbe_list" OnRowDataBound="grdSincereAgent_RowDataBound1">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:CheckBox ID="CheckBox1" runat="server" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="th20 tou" />
                        <ItemStyle CssClass="nolet" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="信息标题">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Title") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemStyle CssClass="left2" />
                        <ItemTemplate>
                              <%# GetNewTitle(DataBinder.Eval(Container.DataItem, "Title").ToString(),Eval("ID").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="TypeName" HeaderText="所属类别">
                        <HeaderStyle CssClass="th25" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Investment" HeaderText="基本投资额">
                        <HeaderStyle CssClass="th80" />
                    </asp:BoundField>
                    <asp:BoundField DataField="Amount" HeaderText="保证金额">
                        <HeaderStyle CssClass="th25" />
                    </asp:BoundField>
                    <asp:BoundField DataField="InitialFee" HeaderText="加盟费">
                        <HeaderStyle CssClass="th25" />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="发布日期">
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# GetShortDate(Eval("AddDate").ToString()) %>'></asp:Label>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th25" />
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="类型">
                        <ItemStyle CssClass="left2" />
                        <ItemTemplate>
                              <%# DataBinder.Eval(Container.DataItem, "SinType").ToString()=="0"?"招商":"代理"%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="审核">
                        <ItemTemplate>
                            <span><%#  ShowVerify(Eval("Verify").ToString())  %></span>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th25" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="推荐">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnUpdateRecommend" Font-Underline="false" runat="server" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID")+"|"+DataBinder.Eval(Container.DataItem, "Recommend") %>'
                                Text='<%# DataBinder.Eval(Container.DataItem, "Recommend").ToString()== "True" ? "推荐" : "不推荐"%>'
                                OnCommand="lbtnUpdateRecommend_Command"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th25" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作选项">
                        <ItemTemplate>
                        <a href='SincereAgentEdit.aspx?ID=<%# Eval("ID") %>&UserID=<%# Eval("UserID") %>'>编辑</a> | <asp:LinkButton CommandName="delete" ID="lnkdelete" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "ID") %>'
                            OnCommand="lnkdelete_Command"  runat="server" Text="删除" OnClientClick="return confirm('你确定要删除吗?')"></asp:LinkButton>
                        </ItemTemplate>
                        <HeaderStyle CssClass="th80" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle CssClass="header" />               
            </asp:GridView>
            <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
             <div class="Paging">
             <p> 
                <uc1:PageNo ID="PageNo1" runat="server" />
			  </p>
			   <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />全选
                <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click" Text="批量删除" CssClass="i_button" />
                               <asp:Button ID="ButEigible" runat="server" Text="审核通过" CssClass="i_button1" OnClick="ButEigible_Click" OnClientClick="javascript:return confirm('您确定要让该信息通过审核吗？') " />
                <asp:Button ID="ButDisqualification" runat="server"  Text="审核未通过" CssClass="i_button1" OnClick="ButDisqualification_Click" OnClientClick="javascript:return confirm('您确定不让该信息通过审核吗？')" />
            </div>
        </div>
    </form>
    <form id="returndata" action="SincereAgentList.aspx">
        <input type="hidden" value="" id="hidverify" />
        <input type="hidden" value="" id="hidPage" />
        <input type="hidden" value="" id="hidSearch1" />
        <input type="hidden" value="" id="hidSearch2" />
        <input type="hidden" value="" id="Hidden4" />
    </form>

    <script language="javascript" type="text/javascript">
    function redirection(strvalue,strtype)
    {
        var reid=strvalue;
        if(strtype.toLowerCase()=="verify")
        {
            document.returndata.hidverify.value=strvalue;
        }else if(strtype.toLowerCase()=="page")
        {
            document.returndata.hidpage.value=strvalue;        
        }else if(strtype.toLowerCase()=="search1")
        {
            document.returndata.hidSearch1.value=strvalue;
        }else if(strtype.toLowerCase()=="search1")
        {
            document.returndata.hidSearch2.value=strvalue;
        }else 
        {
            document.returndata.hidverify.value=strvalue;
        }  
        document.returndata.submit(); 
    }
    
    </script>

</body>
</html>
